﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Ecreate.Model;
using Ecreate.Data;
namespace Ecreate.Business
{
    public class AreaService
    {


        public t_area getAreaByID(string id)
        {

            Object model=FactoryDBEngine.getIBatisService().QueryForObject("t_area_SelectByID", id);
            return (t_area)model;

        }

        public ArrayList getProvinceArea()
        {
            ArrayList list= (ArrayList)FactoryDBEngine.getIBatisService().ExecuteQueryForList("t_area_SelectProvince", null);
            return list;
        }

        public ArrayList getProvinceArea(string value)
        {
            ArrayList list = (ArrayList)FactoryDBEngine.getIBatisService().ExecuteQueryForList("t_area_SelectProvinceByID", value);
            return list;
        }


        public ArrayList getCityArea(string id)
        {
            ArrayList list = (ArrayList)FactoryDBEngine.getIBatisService().ExecuteQueryForList("t_area_SelectCity", id);
            return list;
        }


        public ArrayList getCountryArea(string id)
        {
            ArrayList list = (ArrayList)FactoryDBEngine.getIBatisService().ExecuteQueryForList("t_area_SelectCountry", id);
            return list;
        }
    }
}
